/**
 * Created by lixiang on 23/04/2017.
 */

$(function () {

    var memberVue = new Vue({
        el:'#divController',
        data:{
            memberInfo:{
                mobilePhone:"",
                productSysNo : "",
                memberName: "",
                cardId: "",

                salePrice:"",
                sex:"1",
                saleNum:"1",
                size: ""

            }

        },
        methods:{
            saveMember:function () {


                this.$http.post(webRoot+'/member/newMemberInfo', this.memberInfo,  {credentials: true}).then(function(response)
                    {
                        var datas = response.body;
                        if(datas['error']=='0'){
                            alert(datas['message']);
                            window.location.reload();

                        }else{
                            alert(datas['message']);
                        }

                    },
                    function(response){
                        // error callback
                    });

            }

        }

    });


});




